package com.autonavi.yunda.yunji.core.vo.response;

import com.autonavi.yunda.yunji.core.model.dto.FunctionConfigDTO;
import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author sunzhenbang
 * @date 2022/08/09
 */
@Data
public class FunctionPageVO {
    private List<FunctionConfigVO> functionConfigDTOList;
    private Long total;

    public FunctionPageVO(List<FunctionConfigDTO> functionConfigDTOList, Long total) {
        this.functionConfigDTOList = functionConfigDTOList.stream().map(FunctionConfigVO::fromDto).collect(Collectors.toList());
        this.total = total;
    }
}
